Skip to content

ci: lint test targets as well as the library and binary - #10

Merged
aeddi merged 5 commits into
mainfrom
lint-test-targets
Nov 4, 2026
Merged

aeddi merged 5 commits into
mainfrom
lint-test-targets

Conversation

@aeddi

@aeddi aeddi commented Nov 4, 2026

Copy link
Copy Markdown
Collaborator

Summary

CI's clippy job now lints test code as well as the library and binary. It ran
cargo clippy --all-features, which never compiles test targets — which is how two
deny-level unused_io_amount errors in tests/cli/mod.rs survived from 2018 until #6's
review caught them; #8 fixed them.

Turning --all-targets on surfaced five more warnings, all in tests/integration.rs. They
are fixed here, so the job passes under the workflow's RUSTFLAGS: -Dwarnings.

The documented lint command now matches CI's. The README's was plain cargo clippy, which
has never worked on this fork: with no default backend feature it stops at the
compile_error! in src/lib.rs.

Changes

  • Rename KmsSocket::{TCP, UNIX} to {Tcp, Unix}, matching the sibling KmsConnection — b765765
  • Box the SecretConnection variant, 448 bytes against the other variant's 4 — cb1eef3
  • Pass the message through instead of borrowing it again — c43583d
  • Add --all-targets to CI's clippy job — 74f3311
  • Give the same command in the README and FORK.md — 08c4ebf

Testing

  • CI's command on its pinned toolchain,
    RUSTFLAGS=-Dwarnings cargo +1.89.0 clippy --all-features --all-targets: clean. On the
    base before fix(tests): write captured output in full when a command fails #8 it reported 7 errors.
  • The widened job catches a warn-level lint in test code: reintroducing a single
    needless_borrow fails it.
  • 64 unit + 23 integration tests pass, including the protocol tests that use the renamed and
    boxed types.

@aeddi
aeddi marked this pull request as ready for review November 4, 2026 11:20
@aeddi
aeddi merged commit 471eb9f into main Nov 4, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant